const mysql = require('../mysql')

const T_USER = {
  tableName: 't_user_token',
  query(where) {
    return mysql.query(T_USER.tableName, where)
  },
  updateRTById(id, rt) {
    return mysql.update(T_USER.tableName, `refreshtoken = '${rt}'`, `id = ${id}`)
  }
}

const T_APP = {
  tableName: 't_app_token',
  query(where) {
    return mysql.query(T_APP.tableName, where)
  }
}

module.exports = { T_USER, T_APP }
